*HTML Elements*



HTML (HyperText Markup Language) is the standard language for creating web pages. HTML consists of various elements, which are building blocks that define the structure and content of a webpage.

An HTML element typically consists of an ✔️opening tag, ✔️content, and a ✔️closing tag





The example HTML Element above is composed of the following:

  • <p> is the opening tag.
  • `This is a paragraph.` is the content.
  • </p> is the closing tag.

  • Nested HTML Elements

    There are cases that an HTML element can contain one or more HTML elements, for you to better understand it, look at the code below.




    All the followings are called HTML Elements

  • <html> – The root element of an HTML document.
  • <head> – Contains metadata, links to stylesheets, and scripts.
  • <title> – Specifies the title of the page.
  • <body> – Contains the content displayed on the webpage.
  • <header> – Defines a section header.
  • <footer> – Defines a footer for a section or page.
  • <section> – Defines a standalone section of a document.
  • <article> – Represents a self-contained piece of content.
  • <aside> – Contains related content (e.g., a sidebar).
  • <nav> – Defines navigation links.
  • <main> – Represents the main content of a page.
  • <div> – A container used for styling and layout.
  • <h1> to <h6> – Headings (<h1> is the largest, <h6> is the smallest).
  • <p> – Paragraph.
  • <strong> – Bold text (important).
  • <em> – Italic text (emphasized).
  • <mark> – Highlighted text.
  • <u> – Underlined text.
  • <mark> – Highlighted text.
  • <small> – Smaller text.
  • <del> – Deleted text (strikethrough).
  • <ins> – Inserted text (underline by default).
  • <blockquote> – A block quotation.
  • <cite> – Citation reference.
  • <ul> – Unordered list (bullets).
  • <ol> – Ordered list (numbers).
  • <li> – List item.
  • <dl> – Description list.
  • <dt> – Description term.
  • <dd> – Description definition.
  • <a> – Defines a hyperlink.
  • <nav> – Groups navigation links.
  • <img> – Embeds an image.
  • <audio> – Embeds audio content.
  • <video> – Embeds video content.
  • <source> – Specifies media sources.
  • <table> – Defines a table.
  • <tr> – Table row.
  • <th> – Table header.
  • <td> – Table data.
  • <caption> – Table title.
  • <thead>, <tbody>, <tfoot> – Table sections.
  • <form> – Defines a form.
  • <input> – User input field.
  • <textarea> – Multiline input field.
  • <select> – Dropdown list.
  • <option> – Dropdown options.
  • <button> – Clickable button.
  • <details> – Expandable details.
  • <summary> – Summary for <details>.
  • <dialog> – Modal dialog.